package NIOCommunication;

import java.nio.channels.ClosedChannelException;


public class NIOProcessorUpdateOpsCommand extends NIOProcessorCommand
{
	private NIOContext mContext;
	private int mOps;
	
	public NIOProcessorUpdateOpsCommand(NIOContext context, int ops)
	{
		mContext = context;
		mOps = ops;
	}
	
	public void Execute(NIOProcessor processor)
	{
		try
		{
			if(processor != null)
			{
				processor.RegisterContextOps(mContext, mOps);
			}
		}
		catch (ClosedChannelException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
